#ifndef EXPLOSIONMANAGER_H
#define EXPLOSIONMANAGER_H

#include "IExplosionManager.h"
#include <vector>
using std::vector;

class CEntityExplosion;

class CExplosionManager : public IExplosionManager
{
private:
	//!Vector to store references of the explosion.
	/*! This vector store references of the explosions stored in the World Model.*/
	vector<CEntityExplosion*> m_vectorExplosion;

	//!Vector of explosion template
	vector<CEntityExplosion*> m_vectorOfExplosionType;


public:
	//!Constructor.
	CExplosionManager(void);

	//!Destructor.
	~CExplosionManager(void);

	//!Initialise the Explosion manager.
	void init(void);

	//!Create an example of explosion
	/*!
	\param type The type of explosion.
	\param indexAnim The index of the animation of the explosion.
	\param sound The index of the sound of the explosion.
	*/
	void createExplosionType(eExplosionType type, int indexAnim, int sound);

	//!Create blank explosions in the World Model.
	/*!
	\param numberOfEntities The number of explosion to create.
	\return True if numberOfEntities explosions have been created. False if it failed.
	*/
	bool createExplosions(int numberOfEntities);

	//!Activate an explosion.
	/*!
	Activate the first blank explosion of the WorldModel.
	\param type Set the type of the explosion.
	\param position Set the position of the explosion.
	\return True if the explosion was activated. False if there is no blank explosion to activate.
	*/
	bool activeExplosion(eExplosionType type, const CVector2i& position);
};

#endif
